package com.example.basic;

public class ThreadTest extends Thread{
    private String name;
   public  ThreadTest(String name){
       this.name=name;
   }
    @Override
    public void run() {
        System.out.println(this.name);
    }

    public static void main(String[] args) {
        ThreadTest threadTest = new ThreadTest("李华");
        ThreadTest threadTest1 = new ThreadTest("张三");
        threadTest.start();
        threadTest1.start();
        for (int i = 0; i < 1000; i++) {
            System.out.println("这是main");
        }
    }
}
